import 'dart:async';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'method_channel_pedometer.dart';
import 'pedestrian_status.dart';
import "step_count.dart";
export "pedestrian_status.dart";
export "step_count.dart";

abstract class PedometerPlatform extends PlatformInterface {
  /// Default constructor for [PedometerPlatform]
  PedometerPlatform() : super(token: _token);

  /// The token which [PlatformInterface.verifyToken] needs to be verify
  static final Object _token = Object();

  /// Private instance which will be only create once
  static MethodChannelPedometer _instance = MethodChannelPedometer();

  /// The default instance of [ScreenBrightnessPlatform] to use.
  ///
  /// Defaults to [MethodChannelScreenBrightness].
  static MethodChannelPedometer get instance => _instance;


  /// Platform-specific plugins should set this with their own platform-specific
  /// class that extends [ScreenBrightnessPlatform] when they register themselves.
  static set instance(MethodChannelPedometer instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  /// Returns one step at a time.
  /// Events come every time a step is detected.
  Stream<PedestrianStatus> get pedestrianStatusStream  {
    throw UnimplementedError(
        'setApplicationScreenBrightness(brightness) has not been implemented.');
  }


  /// Returns the steps taken since last system boot.
  /// Events may come with a delay.
  Stream<StepCount> get stepCountStream {
    throw UnimplementedError(
        'setApplicationScreenBrightness(brightness) has not been implemented.');
  }

}
